<?php 
	$doctypeHelper = new Zend_View_Helper_Doctype();
	$doctypeHelper->doctype('XHTML1_STRICT');

	echo $this->doctype();
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<title><?php echo $this->translate( $this->escape($this->title) ); ?></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="description" content="<?php echo $this->escape($this->description); ?>" />
<meta name="keywords" content="<?php echo $this->escape($this->keywords); ?>" />
<?php echo $this->inlineScript()->setScript( '
	var logged  = ' . intval( $this->logged ) . ';
	var baseUrl = "' . $this->baseUrl() . '";
' ); ?>
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/public/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/public/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/public/js/jquery.curvycorners.min.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/public/js/script.js?v=100910"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/public/js/adminscript.js?v=100910"></script>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl(); ?>/public/css/swfupload/default.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl(); ?>/public/css/smoothness/jquery-ui-1.8.custom.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl(); ?>/public/css/admin.css?v=130810" />
</head>
<body>
	<div class="header">
		<div class="logo"></div>
	<?php if( $this->logged ) { ?>
		<div class="welcome">
			<div>Witaj <b><?php echo $this->userData->email ?></b> (<a href="<?php echo $this->baseUrl() ?>/cp/logout">wyloguj</a>)</div>
		</div>
	<?php } ?>
	</div>
	<div class="ps"></div>
	<div class="call">
	<div class="content">
		
		<?php if( $this->logged ) { ?>
			<ul class="menu">
			<?php foreach( $this->menuAdmin as $value ) { ?>
				<?php if( $this->userData->role == 2 ) { ?>
				<li <?php if( $value['met'] == $this->actionName ) echo 'class="act"'; ?>>
				<?php } else { ?>
				<li <?php if( $value['href'] == $this->controllerName ) echo 'class="act"'; ?>>
				<?php } ?>
					<a href="<?php echo $this->baseUrl() ?>/<?php echo $value['href'] ?>"><?php echo $value['name'] ?></a>
					<?php if( isSet( $value['actions'] ) && count( $value['actions'] ) ) {  ?>
						<?php foreach( $value['actions']['action'] as $dt ) {  ?>
						
							<div class="menuplayer" style="display:none;"><a href="<?php echo $this->baseUrl() ?>/<?php echo $dt['href'] ?>"><?php echo $dt['name'] ?></a></div>
						
						<?php } ?>
					<?php } ?>
				</li>
			<?php } ?>
			</ul>
		<div class="in">
			<div class="pd">
				<a class="yih" href="<?php echo $this->baseUrl() ?>/cp/index">Panel Administracyjny</a> &raquo; <a class="yih" href="<?php echo $this->baseUrl() . '/' . $this->controllerName ?>"><?php echo $this->yih ?></a> 
				<?php echo isSet( $this->yih2 ) ? '&raquo; <a class="yih" href="' . $this->requestUri . '">' . $this->yih2 . '</a>' : ''; ?>
				<br /><br />
				<?php if( isSet( $this->oper ) && !empty( $this->oper ) ) {
					echo '<div class="opercomm">' . $this->Opercomm( $this->oper ) . '</div>';
				} ?>
				<?php echo $this->layout()->content; ?>
			</div>
		</div>
		<?php } else { ?>
			<?php echo $this->layout()->content; ?>
		<?php } ?>
	</div>
	
	</div>
	
	<div class="footer">
		<div class="info">
			<?php 
				$date = new Zend_Date();
				echo $date->get(Zend_Date::W3C);
			?>
			 C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub>
		</div>
	</div>
</body>
</html>